﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="ApprovePromotion.aspx.vb" Inherits="Assignment4.ApprovePromotion" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h1>Approve Promotions</h1>
    <p>
        <asp:GridView ID="grvPromotions" runat="server" CellPadding="4" ForeColor="#333333" 
            GridLines="None" AllowPaging="True" AllowSorting="True" 
            AutoGenerateColumns="False" DataKeyNames="PromotionRequestId" 
            DataSourceID="SqlDataSourcePromotions">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="PromotionRequestId" HeaderText="PromotionRequestId" 
                    InsertVisible="False" SortExpression="PromotionRequestId" Visible="False" />
                <asp:BoundField DataField="ProfileName" HeaderText="Name" 
                    SortExpression="ProfileName" />
                <asp:BoundField DataField="ProfileSurname" HeaderText="Surname" 
                    SortExpression="ProfileSurname" />
                <asp:BoundField DataField="PromotionTypeTitle" HeaderText="Type" 
                    SortExpression="PromotionTypeTitle" />
                <asp:ButtonField CommandName="Select" Text="Select" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
    </p>
    <p>
        <asp:Button ID="btnApprove" runat="server" Text="Approve" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnDeny" runat="server" Text="Deny" />
    </p>
    <p>
        <asp:Label ID="lblMessage" runat="server"></asp:Label>
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        <asp:SqlDataSource ID="SqlDataSourcePromotions" runat="server" 
            ConnectionString="<%$ ConnectionStrings:learningConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:learningConnectionString.ProviderName %>" 
            SelectCommand="SELECT PromotionsRequest.PromotionRequestId, PromotionsRequest.UserId, PromotionsRequest.PromotionTypeId, Profiles.ProfileName, Profiles.ProfileSurname, PromotionsType.PromotionTypeTitle FROM ((PromotionsType INNER JOIN PromotionsRequest ON PromotionsType.PromotionTypeId = PromotionsRequest.PromotionTypeId) INNER JOIN Profiles ON PromotionsRequest.UserId = Profiles.UserID)">
        </asp:SqlDataSource>
    </p>

</asp:Content>
